package com.spzx.cart.api;


import com.spzx.cart.api.factory.RemoteCartFallbackFactory;
import com.spzx.cart.domain.CartItem;
import com.spzx.common.core.constant.ServiceNameConstants;
import com.spzx.common.core.domain.R;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(value = ServiceNameConstants.CART_SERVICE,
        fallbackFactory = RemoteCartFallbackFactory.class)
public interface RemoteCartService {
    @Operation(summary = "内部调用接口：查询用户已选中的购物项列表")
    @GetMapping("listCheckedCartItems/{userId}")
    public R<List<CartItem>> listCheckedCartItems(@PathVariable("userId")Long userId);
}
